/*
----------------------------------------------------------------------------
Copyright (c) 2005 - 2009, Wangxing SHI	<swxlion@gmail.com>

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above
	  copyright notice, this list of conditions and the
	  following disclaimer.

    * Redistributions in binary form must reproduce the above
	  copyright notice, this list of conditions and the following
	  disclaimer in the documentation and/or other materials
	  provided with the distribution.

    * Neither the copyright holder's name nor the names of its
	  contributors may be used to endorse or promote products
	  derived from this software without specific prior written
	  permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------------
*/

/*----------------------------- ErrorCode.h -------------------------------*/
/*===========================================================================
FILE: ErrorCode.h
Author: Wangxing SHI (swxlion)
Version: 0.0.2 
Date: 2009-05-15

File Description:
    Define the error codes for Luna Log.

Dependencies:
    Platform: Platform Independent.

History:
    version        author        date       description
	----------------------------------------------------
	0.0.1          swxlion       07-06-26   Created. 
	0.0.2          swxlion       09-05-15   Neaten.
===========================================================================*/
#ifndef _LUNA_LOG__ERROR_CODE_H_
#define _LUNA_LOG__ERROR_CODE_H_

#include "TypeDefine.hpp"
/*===============================================================================
  CONST DEFINITIONS
=============================================================================== */
namespace LunaLog
{
	namespace ErrorCode
	{
		const URESULT			E_OK = 0;
		const URESULT			E_SUCCESS = E_OK;
		const URESULT			E_FAILED = 1;
		//const URESULT			E_UNKNOWN = 2;
		//const URESULT			E_PARAM = 3;
		//const URESULT			E_PARAM_OVERFLOW = 4;
		const URESULT			E_NEW_FAILED = 5;
		//const URESULT			E_NEED_INIT = 6;
		//const URESULT			E_CONFIG_FILE_OPEN = 7;
		//const URESULT			E_LOG_MUTEX_INIT = 5120;
		//const URESULT			E_LOG_FILEPATH = 5121;
		//const URESULT			E_LOG_APPEND = 5122;
		//const URESULT			E_LOG_CREATE_THREAD = 5123;
		//const URESULT			E_LOG_CONDITION_INIT = 5124;
		//const URESULT			E_LOG_MEMORYPOOL_INIT = 5125;
		//const URESULT			E_LOG_MEMORYPOOL_CREATE = 5126;


		/*-------------------------------------------------------------------------
		  !!! The ErrorCodeBase namespace is a private namespace. It may be changed. !!!
		  !!! DO NOT USE this namesapce and its members out of ErrorCode namespace.  !!!
		---------------------------------------------------------------------------*/
		namespace ErrorCodeBase
		{
			const URESULT		MemoryPoolErrorBase = 2048;
			const URESULT		UtilityErrorBase = 8192;
		}
		/*----------------------------------------
		  Error Code for Memory Pool
		  [2048 - 3071]
		-----------------------------------------*/
		const URESULT	E_MEMORY_POOL__APPEND_MEMORY            = ErrorCodeBase::MemoryPoolErrorBase + 1; //-- 2049;
		const URESULT	E_MEMORY_POOL__CATCH_PERFECT_LIMITATION = ErrorCodeBase::MemoryPoolErrorBase + 2; //-- 2050;
		const URESULT	E_MEMORY_POOL__CATCH_LIMITATION         = ErrorCodeBase::MemoryPoolErrorBase + 3; //-- 2051;
	}
}

#endif // _LUNA_LOG__ERROR_CODE_H_
